var socket = io();

socket.on('connect', () => {
    console.log('服务器连接成功');
});

socket.on("disconnect", () => {
    console.log("disconnect");
});

document.getElementById('login').addEventListener('click',function(){
    //alert('发送');
    socket.emit(msg.USER_LOGIN,'test',rst=>{
        alert('返回');
        console.log(rst);
    })
});